<%-- 
    Document   : project-register
    Created on : 2015-4-15, 17:13:38
    Author     : Lin Duxiang
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <link rel="stylesheet" type="text/css" href="front/css/home-page.css"/>
        <link rel="stylesheet" type="text/css" href="front/css/project-register.css"/>
        <link rel="stylesheet" type="text/css" href="front/css/jquery.mCustomScrollbar.css"/>
        <script src="front/js/jquery-1.11.2.js"></script>
        <script src="front/js/Velocity.js"></script>
        <script src="front/js/jquery.mCustomScrollbar.concat.min.js"></script>
        <script src="front/js/home-page.js"></script>
        <script src="front/js/project-register.js"></script>
        <title>活动报名</title>
    </head>

    <c:if test="${addResult=='error'}">
        <script>alert("报名失败")</script>
    </c:if>
    <body class="all-page project-register">
        <div class="header">
            <ul class="parent">
                <li><a href="login">首页</a></li>
                <li><a href="#">个人信息</a>
                    <ul>
                        <li><a href="/LabRegistration/modify">修改个人信息</a></li>
                        <li><a href="/LabRegistration/modifyPassword">修改个人密码</a></li>
                        <li><a href="/LabRegistration/borrowInformation">查看借阅信息</a></li>
                        <li><a href="/LabRegistration/attendanceHistory">查看签到历史</a></li>
                    </ul>
                </li>
                <li><a href="#">文件中心</a>
                    <ul>
                        <li><a href="upload">上传文件</a></li>
                        <li><a href="chackFile">查找文件</a></li>
                    </ul>
                </li>
                <li><a href="GoodsCenter">物品中心</a>
                    <ul>
                    </ul>
                </li>
                <li><a>项目管理</a>
                    <ul>
                        <li><a href="projectManagement">所有项目</a></li>
                        <li><a href="myProject">我的项目</a></li>
                    </ul>
                </li>
                <li><a href="project-register"  id="menu"><span>活动报名</span></a>
                    <ul>
                    </ul>
                </li>
                <li><a href="gitAndBlog.html">分享交流</a>
                    <ul></ul>
                </li>			
            </ul>
            <div class="current-and-exit">
                <a class="exit" href="login2th.html">退出登录</a>
                <p class="current-user">欢迎你，${loginUser.getUserName()}</p>
            </div>
        </div>
        <p class="copyrights">copyrights © 2015-2016 SCAU E-TOP</p>

        <div class="project-display">
            <div class="title">活动报名
                <form>
                    <input id="search" name="search" type="text" placeholder="查找（支持空格多关键字查找）"/>
                </form>
            </div>
            <div class="content">
                <table>
                    <thead>
                        <tr><th>活动列表</th><th>开始报名</th><th>截止报名</th><th>报名参加</th><th>查看详情</th></tr>
                    </thead>					
                    <tbody>

                        <c:forEach var="list" items="${activity}">
                            <tr>
                                <td>${list.name}</td>
                                <td><fmt:formatDate value="${list.s_time}" type="date" pattern="yyyy-MM-dd"/></td>
                                <td><fmt:formatDate value="${list.e_time}" type="date" pattern="yyyy-MM-dd"/></td>
                                <td>
                                    <c:choose >
                                        <c:when test="${list.isAdded == 0}">
                                            <form action="project-register?acti_id=${list.id}" method="POST">
                                                <div class="adjust">
                                                    <input type="submit" value="确认报名"/>						
                                                </div>
                                            </form>
                                        </c:when>
                                        <c:when test="${list.isAdded == 1}">
                                            <a>已报名</a>
                                        </c:when>
                                    </c:choose>

                                </td>
                                <td><a href="project-introduction?id=${list.id}">查看详情</a></td>
                            </tr>	
                        </c:forEach>
                    </tbody>
                </table>
                <div class="confirm-register">
                    <div class="confirm">
                        <p class="title">报名参加</p>
                        <form action="#">
                            <div class="adjust">
                                <input type="submit" value="确认"/>
                                <input type="button" value="取消"/>						
                            </div>
                        </form>
                    </div>
                </div>

                <div class="cancel-register">
                    <div class="cancel">
                        <p>确定真的要取消报名吗？</p>	
                        <div class="adjust">
                            <form>
                                <input type="submit" value="确认"/>
                                <input type="button" value="取消"/>	
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </body>
</html>

